package org.example.xls.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.xls.pojo.dto.ConsultantAppointmentDTO;
import org.example.xls.pojo.vo.ConsultantVO;

import java.util.List;

@Mapper
public interface ConsultantMapper {
    @Select("select * from consultants")
    List<ConsultantVO> selectAll();

    @Select("select name from consultants")
    List<String> selectName();
    @Insert("insert into consultant_appointment (consultant_name, date, time, open_id, phone, letter)" +
            "values (#{consultantName},#{date},#{time},#{openId},#{phone},#{letter})")
    void appointment(ConsultantAppointmentDTO consultantAppointmentDTO);
}